home *** CD-ROM | disk | FTP | other *** search
- // A little test app for ppp.interface.lib.
- // Uses just the console interface.
- // © 1994 Richard Buckle <richardb@cocytus.demon.co.uk>
-
- #include <ppp.interface.h>
- #include <stdio.h>
-
- void main( void )
- {
- short theChoice = 1;
-
- // Use the file menu to quit
- while(theChoice)
- {
- printf( "\n"
- "1. Is PPP installed?\n"
- "2. Is PPP open?\n"
- "3. Open PPP.\n"
- "4. Close PPP hard.\n"
- "5. Close PPP soft.\n" );
-
- scanf( "%hi", &theChoice );
-
- switch( theChoice )
- {
- case 1:
- if(PPPisInstalled())
- printf("PPP is installed\n");
- else
- printf("PPP is not installed\n");
- break;
-
- case 2:
- if(PPPisOpen())
- printf("PPP is open\n");
- else
- printf("PPP is not open\n");
- break;
-
- case 3:
- printf("Opening PPP…\n");
- OpenPPP();
- break;
-
- case 4:
- printf("Hard closing PPP…\n");
- ClosePPPHard();
- break;
-
- case 5:
- printf("Soft closing PPP…\n");
- ClosePPPSoft();
- break;
-
- default:
- printf("Not a valid choice.\n");
- SysBeep(0);
- break;
- }
- }
- }